package com.ruibang.glass.produce.domain.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author: songJinKang
 * @CreateTime: 2023-11-29  16:24
 * @Description: TODO
 * @Version: 1.0
 */
@Data
public class ExportMonitorDataReq implements Serializable {

    @ApiModelProperty("时间间隔")
    @NotNull(message = "时间间隔不可为空")
    private Integer interval;

    @ApiModelProperty("设备ids")
    @NotEmpty(message = "设备id不可为空")
    private List<String> deviceIds;

    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不可为空")
    private LocalDateTime startTime;

    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "结束时间不可为空")
    private LocalDateTime endTime;
}
